Skip to content

COMP: Update RemoteModulePackageAction and Python 3.10+#31

Open
hjmjohnson wants to merge 4 commits intomainfrom
update-pyproject-and-workflows
Open

COMP: Update RemoteModulePackageAction and Python 3.10+#31
hjmjohnson wants to merge 4 commits intomainfrom
update-pyproject-and-workflows

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

@hjmjohnson hjmjohnson commented Nov 12, 2025

Update github actions to v5.4.5 and package management for python 3.10+

  • Bump workflow action from v5.4.0 to v5.4.5 to use the v5.4.5 ITKPythonBuilds release
  • Update minimum Python version from 3.8 to 3.10
  • Add Python wrapping for CellularAggregateBase and CellularAggregate
  • Fix wrapping for itk::bio namespace classes (WRAPPER_AUTO_INCLUDE_HEADERS, itk_wrap_simple_class, WRAPPER_SUBMODULE_ORDER)

@hjmjohnson hjmjohnson force-pushed the update-pyproject-and-workflows branch from ade7432 to 3c7010a Compare March 27, 2026 15:38
hjmjohnson and others added 4 commits April 1, 2026 17:11
Update github actions to v5.4.5 and package management for python 3.10

Bump workflow action from v5.4.4 to v5.4.5 to use the v5.4.5
ITKPythonBuilds release.
BioCell was the only ITKRemoteModule with a pyproject.toml but no
wrapping/ directory, causing the Python wheel build CI to fail: the
manylinux build script found no .whl to repair and exited with an error.

Add wrapping for the two itk::Object-derived classes:
- itk::bio::CellularAggregateBase (non-templated)
- itk::bio::CellularAggregate<2> and <3>

Adding this simple wrapping allows the standard python wrapping
infrastructure to be tested and consistent with other remote modules.

Generative AI was used to diagnose and recommend this solution.
The ITK wrapping machinery derives include filenames from the class name
by stripping all but the leaf name: itk::bio::CellularAggregate ->
itkCellularAggregate.h. The actual headers use the Bio prefix
(itkBioCellularAggregate.h), causing castxml to abort with
"file not found".

Add explicit itk_wrap_include() directives so the generated castxml
input files include the correct headers.

Generative AI was used to diagnose and recommend this solution.
Three issues prevented the Python wrapping from building:

1. WRAPPER_AUTO_INCLUDE_HEADERS was ON, causing itk_wrap_class to
   auto-derive wrong header filenames (itkCellularAggregateBase.h
   instead of itkBioCellularAggregateBase.h). Disable auto-include
   and rely on the explicit itk_wrap_include() directives, matching
   the pattern used by Ultrasound (BlockMatching) and ITK Statistics.

2. CellularAggregateBase is a non-template class but was wrapped with
   itk_wrap_class/itk_end_wrap_class (no itk_wrap_template calls),
   producing an empty SWIG interface. Use itk_wrap_simple_class
   instead so the class is properly registered.

3. itk_auto_load_submodules() processes .wrap files alphabetically,
   causing CellularAggregate to load before its base class. Add
   WRAPPER_SUBMODULE_ORDER to enforce correct dependency ordering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hjmjohnson hjmjohnson force-pushed the update-pyproject-and-workflows branch from 043aab7 to e619399 Compare April 1, 2026 22:11
@hjmjohnson hjmjohnson changed the title COMP: Update RemoteModulePackageAction and Python 3.9+ COMP: Update RemoteModulePackageAction and Python 3.10+ Apr 1, 2026
@hjmjohnson hjmjohnson requested review from dzenanz and thewtex April 1, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants